<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="申请日期">
        <el-date-picker v-model="daterangeApplyDate" style="width: 240px" type="datetimerange"
          value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" range-separator="-"
          start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
      </el-form-item>
      <el-form-item label="姓名" prop="partyId">
        <el-select v-model="queryParams.partyId" placeholder="请选择员工姓名" clearable filterable>
          <el-option v-for="dict in partyIdOptions" :key="dict.partyId" :label="dict.firstName" :value="dict.partyId" />
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="姓名" prop="firstName">
        <el-input
          v-model="queryParams.firstName"
          placeholder="请输入姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="身份证" prop="cardId">
        <el-input v-model="queryParams.cardId" placeholder="请输入身份证号码" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="手机" prop="mobilePhone">
        <el-input v-model="queryParams.mobilePhone" placeholder="请输入手机" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini">
          <router-link :to="'/workflow/approve/empl_entry/apply'" class="link-type">
            <span>入职办理申请</span>
          </router-link>
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
          v-hasPermi="['ehr:empl_entry:export']">导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="empl_entryList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="申请记录" align="center" prop="entryApplyId" />
      <el-table-column label="申请日期" align="center" prop="applyDate" width="180">
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.applyDate, "{y}-{m}-{d} {h}:{i}:{s}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column label="员工编号" align="center" prop="partyId" width="100" />
      <el-table-column label="姓名" align="center" prop="firstName" width="120" />
      <el-table-column label="性别" align="center" prop="gender" :formatter="genderFormat" />
      <el-table-column label="证件号码" align="center" prop="cardId" width="160" />
      <el-table-column label="手机" align="center" prop="mobilePhone" width="120" />
      <!-- <el-table-column label="更新日期" align="center" prop="lastUpdatedStamp" width="180">
    <template slot-scope="scope">
      <span>{{ parseTime(scope.row.lastUpdatedStamp, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
    </template>
  </el-table-column> -->
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-document" @click="handleDetail(scope.row)"
            v-hasPermi="['ehr:empl_entry:detail']">详情</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />

    <!-- 添加或修改入职办理对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="申请日期" prop="applyDate">
              <span>{{ form.applyDate }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="申请人" prop="applyPartyId">
              <span>{{ form.applyPartyId }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="员工编号" prop="partyId">
              <span>{{ form.partyId }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-divider content-position="center">员工信息</el-divider>
        <el-row>
          <el-col :span="12">
            <el-form-item label="姓名" prop="firstName">
              <span>{{ form.firstName }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="性别" prop="gender">
              <span>{{ genderFormat(form) }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="民族" prop="nation">
              <span>{{ nationFormat(form) }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出生日期" prop="birthDate">
              <span>{{ form.birthDate }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="证件类型" prop="cardType">
              <span>{{ cardTypeFormat(form) }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="身份证号" prop="cardId">
              <span>{{ form.cardId }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="手机" prop="mobilePhone">
              <span>{{ form.mobilePhone }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="个人邮箱" prop="personalEmail">
              <span>{{ form.personalEmail }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="最高学历" prop="education">
              <span>{{ educationFormat(form) }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="婚姻" prop="maritalStatus">
              <span>{{ maritalStatusFormat(form) }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="住址" prop="homeAddress">
              <span>{{ form.homeAddress }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-divider content-position="center">HR设置</el-divider>
        <el-row>
          <el-col :span="12">
            <el-form-item label="员工类型" prop="emplType">
              <span>{{ emplTypeFormat(form) }}</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="入职部门" prop="deptId">
              <span>{{ deptIdFormat(form) }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="入职岗位" prop="positionId">
              <span>{{ positionIdFormat(form) }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="上级主管" prop="supervisor">
              <span>{{ supervisorFormat(form) }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="入职日期" prop="entryDate">
              <span>{{ form.entryDate }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否试用期" prop="isProbation">
              <span>{{ isProbationFormat(form) }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="试用期" prop="probationPeriod">
              <span>{{ form.probationPeriod }} 个月 </span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="首次工作日期" prop="joinWorkTime">
              <span>{{ form.joinWorkTime }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="入职状态" prop="entryStatusId">
              <span>{{ entryStatusIdFormat(form) }}</span>
            </el-form-item>
          </el-col>
        </el-row>

        <el-divider content-position="center">合同信息</el-divider>
        <el-row>
          <el-col :span="12">
            <el-form-item label="合同类型" prop="contractType">
              <span>{{ contractTypeFormat(form) }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="合同签订日期" prop="signContractDate">
              <span>{{ form.signContractDate }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="合同期" prop="contractTerm">
              <span>{{ form.contractTerm }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-divider content-position="center">附件信息</el-divider>
        <el-row>
          <el-col :span="20">
            <el-form-item label="附件" prop="affixFilePath">
              <span>{{ form.affixFilePath }}</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="流程状态" prop="flowStatus">
              <span>{{ flowStatusFormat(form) }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审批人" prop="approver">
              <span>{{ approverFormat(form) }}</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button v-if="editFlag" type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listEmpl_entry,
  getEmpl_entry,
  delEmpl_entry,
  addEmpl_entry,
  updateEmpl_entry,
} from "@/api/ehr/empl_entry";
// person enum api
import { getPersonEnum } from "@/api/ehr/person";
export default {
  name: "Empl_entry",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 入职办理表格数据
      empl_entryList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 人员字典
      personOptions: [],
      // 审批人时间范围
      daterangeApplyDate: [],
      // 入职申请人业务字典
      applyPartyIdOptions: [],
      // 员工ID业务字典
      partyIdOptions: [],
      // 性别业务字典
      genderOptions: [],
      // 民族业务字典
      nationOptions: [],
      // 证件类型业务字典
      cardTypeOptions: [],
      // 入职类别业务字典
      entryTypeOptions: [],
      // 员工类型业务字典
      emplTypeOptions: [],
      // 入职部门业务字典
      deptIdOptions: [],
      // 入职岗位业务字典
      positionIdOptions: [],
      // 职级业务字典
      bandLevelOptions: [],
      // 是否试用期业务字典
      isProbationOptions: [],
      // 上级主管业务字典
      supervisorOptions: [],
      // 学历（最高）业务字典
      educationOptions: [],
      // 政治面貌业务字典
      politicStatusOptions: [],
      // 婚姻状况业务字典
      maritalStatusOptions: [],
      // 合同类型业务字典
      contractTypeOptions: [],
      // 入职状态业务字典
      entryStatusIdOptions: [],
      // 流程状态业务字典
      flowStatusOptions: [],
      // 审批人业务字典
      approverOptions: [],
      // 操作标识,用于区分是新增还是修改
      updateFlag: false,
      // 操作标识,用于区分是详情
      detailFlag: false,
      // 操作标识,用于区分编辑状态
      editFlag: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        // orderByColumn: "lastUpdatedStamp", // 排序字段
        orderByColumn: "applyDate", // 排序字段
        isAsc: "DESC", // 升序或降序 大写的 ASC或DESC,为空代表升序
        applyDate: null,
        partyId: null,
        firstName: null,
        cardId: null,
        mobilePhone: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        applyDate: [
          { required: true, message: "申请日期不能为空", trigger: "blur" },
        ],
        partyId: [
          { required: true, message: "员工ID不能为空", trigger: "change" },
        ],
        firstName: [
          { required: true, message: "姓名不能为空", trigger: "blur" },
        ],
        gender: [{ required: true, message: "性别不能为空", trigger: "blur" }],
        cardId: [
          { required: true, message: "证件号码不能为空", trigger: "blur" },
        ],
        mobilePhone: [
          { required: true, message: "手机不能为空", trigger: "blur" },
        ],
        supervisor: [
          { required: true, message: "上级主管不能为空", trigger: "change" },
        ],
        approver: [
          { required: true, message: "审批人不能为空", trigger: "change" },
        ],
      },
    };
  },
  created() {
    // 人员字典
    getPersonEnum().then((response) => {
      this.personOptions = response.data;
    });
    // 员工ID业务字典
    this.getEntityDicts("person:partyId:firstName").then((response) => {
      this.partyIdOptions = response.data;
    });
    // 性别业务字典
    this.getEnumDicts("PERSON_GENDER").then((response) => {
      this.genderOptions = response.data;
    });
    // 民族业务字典
    this.getEnumDicts("NATION").then((response) => {
      this.nationOptions = response.data;
    });
    // 证件类型业务字典
    this.getEnumDicts("PERSON_CARD_TYPE").then((response) => {
      this.cardTypeOptions = response.data;
    });
    // 入职类别业务字典
    this.getEnumDicts("EMPL_ENTRY_TYPE").then((response) => {
      this.entryTypeOptions = response.data;
    });
    // 员工类型业务字典
    this.getEnumDicts("EMPL_TYPE").then((response) => {
      this.emplTypeOptions = response.data;
    });
    // 入职部门业务字典
    this.getEntityDicts("sysDept:deptId:deptName").then((response) => {
      this.deptIdOptions = response.data;
      this.deptIdOptions.forEach((item, index) => {
        item.deptId = item.deptId + "";
      });
    });
    // 入职岗位业务字典
    this.getEntityDicts("sysPost:postId:postName").then((response) => {
      this.positionIdOptions = response.data;
      this.positionIdOptions.forEach((item, index) => {
        item.postId = item.postId + "";
      });
    });
    // 是否试用期业务字典
    this.getEnumDicts("YES_NO").then((response) => {
      this.isProbationOptions = response.data;
    });
    // 上级主管业务字典
    this.getEntityDicts("person:partyId:firstName").then((response) => {
      this.supervisorOptions = response.data;
    });
    // 学历（最高）业务字典
    this.getEnumDicts("PERSON_EDUCATION").then((response) => {
      this.educationOptions = response.data;
    });
    // 政治面貌业务字典
    this.getEnumDicts("PERSON_POLITIC").then((response) => {
      this.politicStatusOptions = response.data;
    });
    // 婚姻状况业务字典
    this.getEnumDicts("PERSON_MARITAL").then((response) => {
      this.maritalStatusOptions = response.data;
    });
    // 合同类型业务字典
    this.getEnumDicts("EMPL_CONTRACT_TYPE").then((response) => {
      this.contractTypeOptions = response.data;
    });
    // 入职状态业务字典
    this.getEnumDicts("FLOW_STATUS").then((response) => {
      this.entryStatusIdOptions = response.data;
    });
    // 流程状态业务字典
    this.getEnumDicts("FLOW_STATUS").then((response) => {
      this.flowStatusOptions = response.data;
    });
    // 审批人业务字典
    this.getEntityDicts("person:partyId:firstName").then((response) => {
      this.approverOptions = response.data;
    });
    this.getList();
  },
  methods: {
    // 人员字典转换
    personFormat(row, column) {
      let val = null;
      this.personOptions.forEach((item, index) => {
        if (row.partyId === item.partyId) {
          val = item.name;
        }
      });
      return val;
    },
    // 审批人字典转换
    approverFormat(row, column) {
      let val = null;
      this.personOptions.forEach((item, index) => {
        if (row.approver === item.partyId) {
          val = item.name;
        }
      });
      return val;
    },
    partyIdFormat(row, column) {
      let val = null;
      this.partyIdOptions.forEach((item, index) => {
        if (row.partyId === item.partyId) {
          val = item.firstName;
        }
      });
      return val;
    },
    genderFormat(row, column) {
      let val = null;
      this.genderOptions.forEach((item, index) => {
        if (row.gender === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    nationFormat(row, column) {
      let val = null;
      this.nationOptions.forEach((item, index) => {
        if (row.nation === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    cardTypeFormat(row, column) {
      let val = null;
      this.cardTypeOptions.forEach((item, index) => {
        if (row.cardType === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    entryTypeFormat(row, column) {
      let val = null;
      this.entryTypeOptions.forEach((item, index) => {
        if (row.entryType === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    emplTypeFormat(row, column) {
      let val = null;
      this.emplTypeOptions.forEach((item, index) => {
        if (row.emplType === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    deptIdFormat(row, column) {
      let val = null;
      this.deptIdOptions.forEach((item, index) => {
        if (row.deptId === item.deptId) {
          val = item.deptName;
        }
      });
      return val;
    },
    positionIdFormat(row, column) {
      let val = null;
      this.positionIdOptions.forEach((item, index) => {
        if (row.positionId === item.postId) {
          val = item.postName;
        }
      });
      return val;
    },
    isProbationFormat(row, column) {
      let val = null;
      this.isProbationOptions.forEach((item, index) => {
        if (row.isProbation === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    supervisorFormat(row, column) {
      let val = null;
      this.supervisorOptions.forEach((item, index) => {
        if (row.supervisor === item.partyId) {
          val = item.firstName;
        }
      });
      return val;
    },
    educationFormat(row, column) {
      let val = null;
      this.educationOptions.forEach((item, index) => {
        if (row.education === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    politicStatusFormat(row, column) {
      let val = null;
      this.politicStatusOptions.forEach((item, index) => {
        if (row.politicStatus === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    maritalStatusFormat(row, column) {
      let val = null;
      this.maritalStatusOptions.forEach((item, index) => {
        if (row.maritalStatus === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    contractTypeFormat(row, column) {
      let val = null;
      this.contractTypeOptions.forEach((item, index) => {
        if (row.contractType === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    entryStatusIdFormat(row, column) {
      let val = null;
      this.entryStatusIdOptions.forEach((item, index) => {
        if (row.entryStatusId === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    flowStatusFormat(row, column) {
      let val = null;
      this.flowStatusOptions.forEach((item, index) => {
        if (row.flowStatus === item.enumCode) {
          val = item.description;
        }
      });
      return val;
    },
    approverFormat(row, column) {
      let val = null;
      this.approverOptions.forEach((item, index) => {
        if (row.approver === item.partyId) {
          val = item.firstName;
        }
      });
      return val;
    },
    /** 查询入职办理列表 */
    getList() {
      this.loading = true;
      this.queryParams.params = {};
      if (null != this.daterangeApplyDate && "" != this.daterangeApplyDate) {
        this.queryParams.params["beginApplyDate"] = this.daterangeApplyDate[0];
        this.queryParams.params["endApplyDate"] = this.daterangeApplyDate[1];
      }
      listEmpl_entry(this.queryParams).then((response) => {
        this.empl_entryList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        entryApplyId: null,
        applyDate: null,
        applyPartyId: null,
        partyId: null,
        firstName: null,
        gender: "0",
        nation: null,
        birthDate: null,
        cardType: null,
        cardId: null,
        mobilePhone: null,
        personalEmail: null,
        employeeNo: null,
        entryType: null,
        emplType: null,
        orgId: null,
        deptId: null,
        positionId: null,
        bandLevel: null,
        entryDate: null,
        isProbation: "0",
        probationPeriod: null,
        workPlace: null,
        supervisor: null,
        telephone: null,
        mail: null,
        imageData: null,
        cardDueDate: null,
        nativePlace: null,
        residentialAddress: null,
        homeAddress: null,
        education: null,
        politicStatus: null,
        maritalStatus: "0",
        health: null,
        emergencyPerson: null,
        emergencyPhone: null,
        joinWorkTime: null,
        basicSalary: null,
        performanceSalary: null,
        employeeCardNumbers: null,
        contractType: null,
        signContractDate: null,
        contractTerm: null,
        entryStatusId: null,
        affixFilePath: null,
        flowInstId: null,
        flowStatus: null,
        approver: null,
        lastUpdatedStamp: null,
        lastUpdatedTxStamp: null,
        createdStamp: null,
        createdTxStamp: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.daterangeApplyDate = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.entryApplyId);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      (this.editFlag = true), (this.updateFlag = false);
      this.detailFlag = false;
      this.reset();
      this.open = true;
      this.title = "添加入职办理";
    },
    /** 详情按钮操作 */
    handleDetail(row) {
      (this.editFlag = false), (this.updateFlag = false);
      this.detailFlag = true;
      this.reset();
      const entryApplyId = row.entryApplyId || this.ids;
      getEmpl_entry(entryApplyId).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "入职办理详情";
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.editFlag = true;
      this.updateFlag = true;
      this.detailFlag = false;
      this.reset();
      const entryApplyId = row.entryApplyId || this.ids;
      getEmpl_entry(entryApplyId).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "修改入职办理";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.entryApplyId != null && this.updateFlag) {
            updateEmpl_entry(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addEmpl_entry(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const entryApplyIds = row.entryApplyId || this.ids;
      this.$modal
        .confirm('是否确认删除入职办理编号为"' + entryApplyIds + '"的数据项？')
        .then(function () {
          return delEmpl_entry(entryApplyIds);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => { });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "ehr/empl_entry/export",
        {
          ...this.queryParams,
        },
        `empl_entry_${new Date().getTime()}.xlsx`
      );
    },
  },
};
</script>
